Skip to content

gh-145176 Move Emscripten files into Platforms/emscripten#145806

Open
hoodmane wants to merge 4 commits intopython:mainfrom
hoodmane:emscripten-to-platforms-directory
Open

gh-145176 Move Emscripten files into Platforms/emscripten#145806
hoodmane wants to merge 4 commits intopython:mainfrom
hoodmane:emscripten-to-platforms-directory

Conversation

@hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Mar 11, 2026

To see the diff in __main__.py look at just the first commit.

@hoodmane
Copy link
Contributor Author

!buildbot Emscripten

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @hoodmane for commit e8221bd 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145806%2Fmerge

The command will test the builders whose names match following regular expression: Emscripten

The builders matched are:

  • WASM Emscripten PR

@hoodmane
Copy link
Contributor Author

!buildbot Emscripten

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @hoodmane for commit 6257cd3 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145806%2Fmerge

The command will test the builders whose names match following regular expression: Emscripten

The builders matched are:

  • WASM Emscripten PR

Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bones of this all look straightforward; I've flagged a couple of things inline, including the directory simplification that I raised during the last PR.

There's also evidently still an issue with testing - I'm guessing it's the path depth in playwright.config.ts. That will also need to be updated for the path simplification - and if there's a way to make it work with a custom cross-build folder, that would be even better.

Comment on lines +70 to +71
"host_build_dir": host_triple_dir / "build",
"host_dir": host_triple_dir / "build" / "python",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the suggestion I made during the final reviews of the last PR:

Suggested change
"host_build_dir": host_triple_dir / "build",
"host_dir": host_triple_dir / "build" / "python",
"host_build_dir": host_triple_dir
"host_dir": host_triple_dir / "python",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this breaks the build bot? So the idea is:

  1. Merge this as is
  2. Add run subcommand
  3. Change build bot to use new Platforms/emscripten path and the run subcommand

Then we could make this change although there may be other places where the build bot depends on the current build path.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would break the buildbot; I hadn't considered that if we make this change, then make the buildbot use the new entry script, the buildbot sensitive to the build path goes away.

So yes - your landing plan makes sense to me.

if __name__ == "__main__":
main()
import pathlib
import runpy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably include a warning mirroring the WASI one:

Suggested change
import runpy
import runpy
print(
"⚠️ WARNING: This script is deprecated and slated for removal in Python 3.20; "
"execute the `Platforms/emscripten/` directory instead (i.e. `python Platforms/emscripten`)\n",
file=sys.stderr,
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep it around that long?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date is the same one in the WASI folder - I don't know what drove @brettcannon's decision in that. I agree it seems super conservative.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it doesn't hurt, though I think moving the path where we build from cross-build/emscripten/build/python is going to break anyone who would be broken by removing this script so we should decide what our backwards compatibility aims are and be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could delete it as soon as we update the build bot personally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been super conservative since the code is just sitting there and not in anyone's way. Plus there's a bit of simplicity with the buildbots when supporting older versions prior to the fix.

@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants